package com.qtcm.nas.fyx.bendianpinglun.web;

import com.qtcm.nas.fyx.bendianpinglun.pojo.Student;
import com.qtcm.nas.fyx.bendianpinglun.service.IUserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller("userController")
@RequestMapping("/ppp")
public class UserController {
    @Autowired
    @Qualifier("userService")
    private IUserService userService;

    @RequestMapping("/findAll")
    public String findAll(){
        List<Student> all = userService.findAll();
        for (Student s:all
             ) {
            System.out.println(s);
        }
        return "index";
    }
}
